#include "ImageSettingItem.h"
#include "ui_ImageSettingItem.h"

ImageSettingItem::ImageSettingItem(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::ImageSettingItem)
{
    ui->setupUi(this);
}

ImageSettingItem::~ImageSettingItem()
{
    delete ui;
}

void ImageSettingItem::setItemId(int id)
{
    g_id = id;
}

void ImageSettingItem::setItemTitle(QString info)
{
    ui->title->setText(info);
}

void ImageSettingItem::setItemValue(QString info)
{
    ui->value->setText(info);
}

void ImageSettingItem::on_add_clicked()
{
    /* add */
    emit syncValueSignal(g_id, 1);
}

void ImageSettingItem::on_sub_clicked()
{
    /* sub */
    emit syncValueSignal(g_id, 0);
}
